# CyUku/Makefile
TARGETS = bin/runner bin/compiler bin/lib_installer bin/syscaller bin/foreign_lib_caller
LIBS = lib/libcore.so lib/libc_interface.so lib/libgo_interface.so

all: $(TARGETS) $(LIBS)

lib/%.so: build/%.o
    gcc -shared -o $@ $^

bin/%: build/tools/%.o $(LIBS)
    gcc -o $@ $^ -Llib -lcore -ldl

build/%.o: src/%.asm
    nasm -f elf64 -o $@ $^

clean:
    rm -f build/*.o lib/*.so bin/*

.PHONY: all clean